<div id="inquiryAddEl">
	<div class="bg-light lter b-b wrapper-sm">
		<h1 class="m-n font-thin h4">{{titleInquiry}}</h1>
	</div>
	<div class="wrapper-sm">
		<div class="panel panel-default">
			<div class="panel-body">
				<validator name="validation">
					<form id="inquiryForm" class="form-validation form-horizontal novalidate">
						<!--:disabled="{disabled:titleInquiry=='询价单详情'}"-->
						<fieldset id="fieldsetDisabled">
							<div class="form-group">
								<div class="panel-heading font-bold m-t-n m-b-sm">
									基本信息
								</div>
								<label class="col-lg-1 pull-left control-label">子询价单编号:</label>
								<label class="col-lg-2 control-label text-left">{{inquiryChildCode}}</label>
								<label class="w-s pull-left control-label">询价时间<span class="text-danger">*</span></label>
								<label class="col-lg-2 control-label text-left">{{inquiryTime}}</label>
								<label class="w-s pull-left control-label">紧急程度<span class="text-danger">*</span></label>
								<div class="col-lg-1 pull-left">
									<input class="form-control input-sm" id="addOrderCtrl_urgency" v-model="urgency" placeholder="请填写紧急程度" name="number" type="number" v-validate:urgency="{required: true, pattern:'/^[0-9]*[1-9][0-9]*$/'}">
								</div>
								<div class="pull-left m-l-n-sm">
									<select v-model="urgencyUnit" class="form-control input-sm" v-validate:urgencyUnit="['required']">
												<option value="" selected>请选择</option>
												<option v-for="option in urgencyUnitDropDown" v-bind:value="option.value">
													{{ option.text }}
												</option>
									</select>
								</div>
								<label class="control-label text-left m-l-xs">内回复</label>
								<!--<div class="col-lg-1">
									<input id="inquiryAdd_urgency" name="urgency" type="text" class="form-control input-sm" v-model="urgency" v-validate:urgency="['required']" placeholder="请填写紧急程度">
								</div>
								<div class="pull-left m-l-n-sm">
									<select v-model="urgencyUnit" class="form-control input-sm" v-validate:urgencyUnit="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in urgencyUnitDropDown" v-bind:value="option.value">
											{{ option.text }}
										</option>
									</select>-->
									<!--<select id="inquiryAdd_urgencyUnit" class="form-control input-sm" v-model="urgencyUnit" name="urgencyUnit" ng-options="x.value as x.text for x in urgencyUnitDropDown"
										ng-disabled="editInquiryDis" required>
										<option value="">请选择</option>
									</select>-->
									<!--<label class="m-l-sm control-label">内回复</label>
								</div>-->

								
							</div>
							<div class="form-group">
								<label class="col-lg-1 pull-left control-label">客户单位<span class="text-danger">*</span></label>
								<label class="col-lg-2 control-label text-left">{{customerUnit}}</label>
								<label class="w-s pull-left control-label">发货计划人<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<!--<input type="text" class="form-control input-sm" v-model="consignor" placeholder="请填写发货计划人" v-validate:consignor="['required']" name="consignorPhone">-->
									<select class="form-control input-sm" v-model="consignor" v-validate:consignor="['required']" @change="changeConsignor()">
										<option value="" selected>请选择</option>
										<option v-for="option in consignorDropDown" v-bind:value="option.realName">
											{{ option.realName }}
										</option>
									</select>
								</div>
								<label class="w-s pull-left control-label">发货人电话<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<input id="inquiryAdd_consignorPhone" name="consignorPhone" type="text" class="form-control input-sm" v-model="consignorPhone" placeholder="请填写发货人电话" required name="consignorPhone"
										disabled="disabled">
								</div>
							</div>
							<div class="form-group">
								<label class="col-lg-1 pull-left control-label">总询价内容  :</label>
								<div class="col-lg-10 pull-left control-label">
									<textarea class="form-control input-sm" v-model="content" placeholder="请填写总询价内容" name="content"></textarea>
								</div>
							</div>
							<div class="form-group">
								<div class="panel-heading font-bold m-b-sm">
									线路信息
								</div>
								<label class="col-lg-1 pull-left control-label">发货地址<span class="text-danger">*</span></label>
								<div class="col-lg-10">
									<div class="pull-left form-group form-inline m-n" required="true">
										<div class="form-group m-n">
											<select  class="form-control required input-sm" name="popupProvince" @change="changeStarProvince()" v-model="starProvince" v-validate:starProvince="['required']">
													<option value="" selected>请选择</option>
													<option v-for="option in starProvinceList" v-bind:value="option.value">
													{{ option.text }}
													</option>
											</select>
										</div>
										<!--//v-validate:starCity="['required']"-->
										<div class="form-group m-n">
											<select class="form-control required input-sm" name="popupCity" v-model="starCity" @change="changeCity()"  v-validate:starCity="{ required:true }" >
												<option value="" selected>请选择</option>
												<option v-for="option in starCityList" v-bind:value="option.value">
													{{ option.text }}
												</option>
											</select>
										</div>
										<div class="form-group m-n">
												<select class="form-control required input-sm" name="popupCity" v-model="starAreaCity"  v-validate:starAreaCity="['required']">
												<option value=""  selected>请选择</option>
												<option v-for="option in starAreaList" v-bind:value="option.value">
													{{ option.text }}
												</option>
											</select>
										</div>
									</div>
									<div class="col-lg-4 m-l-n-sm">
										<input id="inquiryAdd_startAddress" name="popupCity" type="text" class="form-control input-sm" v-model="startAddress" placeholder="请填写详细地址"
											v-validate:startAddress="['required']" >
									</div>
								</div>
								<div class="line  pull-in"></div>
								<label class="col-lg-1 pull-left control-label">送货地址<span class="text-danger">*</span></label>
								<div class="col-lg-10">
									<div class="pull-left form-group form-inline m-n" required="true">
										<div class="form-group m-n">
											<select  class="form-control required input-sm" name="popupProvince" @change="changeEndProvince()" v-model="endProvince" v-validate:endProvince="['required']">
													<option value="" selected>请选择</option>
													<option v-for="option in endProvinceList" v-bind:value="option.value">
														{{ option.text }}
													</option>
											</select>
										</div>
										<div class="form-group m-n">
											<select class="form-control required input-sm" name="popupCity" v-model="endCity" @change="changeEndCity()" v-validate:endCity="['required']">
												<option value="" selected>请选择</option>
												<option v-for="option in endCityList" v-bind:value="option.value">
													{{ option.text }}
												</option>
											</select>
										</div>
										<div class="form-group m-n">
											<select class="form-control required input-sm" name="popupCity" v-model="endArea"  v-validate:endArea="['required']">
												<option value="" selected>请选择</option>
												<option v-for="option in endAreaList" v-bind:value="option.value">
													{{ option.text }}
												</option>
											</select>
										</div>
									</div>
									<div class="col-lg-4 m-l-n-sm">
									<input id="inquiryAdd_endAddress" name="endAddress" type="text" class="form-control input-sm" v-model="endAddress" placeholder="请填写详细地址" v-validate:endAddress="['required']">
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-lg-1 pull-left control-label">预计发货时间<span class="text-danger">*</span></label>
								<div class="col-lg-3">
									<div class="input-group input-group-sm date">
										<input id="dataTime" name="plannedArrivalTime" datetimepicker plugintype="datetime" v-model="plannedArrivalTime" placeholder="预计到货时间"
											class="form-control required" type="text" v-validate:plannedArrivalTime="['required']"/>
										<span id="opendataTime" class="input-group-addon curpoint">
											<span class="glyphicon glyphicon-calendar"></span>
										</span>
									</div>
								</div>
								<label class="w-s pull-left control-label">预计到货时间<span class="text-danger">*</span></label>
								<div class="col-lg-3">
									<div class="input-group input-group-sm date">
										<input id="dataTimeEnd" name="plannedDeliveryTime" datetimepicker plugintype="datetime" v-model="plannedDeliveryTime" placeholder="预计发货时间"
											class="form-control required" type="text" v-validate:plannedDeliveryTime="['required']"/>
										<span id="opendataTimeEnd" class="input-group-addon curpoint">
											<span class="glyphicon glyphicon-calendar"></span>
										</span>
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="panel-heading font-bold m-b-sm">
									货物信息
								</div>
								<label class="col-lg-1 pull-left control-label">货物类别<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<select id="inquiryAdd_goodsTypeName" class="form-control input-sm" v-model="goodsTypeId" name="goodsTypeId" @change="goodsTypeSelect()"  v-validate:goodsTypeId="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in goodsTypeDropDown" v-bind:value="option.id">
											{{ option.name }}
										</option>
									</select>
								</div>
								<label class="w-s pull-left control-label">货物名称<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<select class="form-control input-sm" id="inquiryAdd_goodsName" v-model="goodsId" name="goodsId" v-validate:goodsId="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in goodsNameDropDown" v-bind:value="option.id">
											{{ option.name }}
										</option>
									</select>
								</div>
								<label class="w-s pull-left control-label">货物数量<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<!--ng-pattern="/^[0-9]+(\.[0-9]{1,4})?$/"-->
									<input id="inquiryAdd_goodsQuantity" name="goodsQuantity" type="text" class="form-control input-sm"  v-model="goodsQuantity"
										placeholder="请填写货物数量"  v-validate:goodsQuantity="{required: true, pattern:'/^[0-9]+(\.[0-9]{1,4})?$/'}">
								</div>
								<div class="col-lg-2 m-l-n-sm">
									<select class="form-control input-sm" id="inquiryAdd_goodsQuantityUnit" v-model="goodsQuantityUnit" name="goodsQuantityUnit" v-validate:goodsQuantityUnit="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in goodsQuantityUnitDropDown" v-bind:value="option.value">
											{{ option.text }}
										</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<div class="panel-heading font-bold m-b-sm">
									所需车辆信息
								</div>
								<label class="col-lg-1 pull-left control-label">所需车型<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<select id="inquiryAdd_carType" class="form-control input-sm" v-model="carType" name="carType" v-validate:carType="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in carTypeDropDown" v-bind:value="option.value">
											{{ option.text }}
										</option>
									</select>
								</div>
								<label class="w-s pull-left control-label">所需车长<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<select id="inquiryAdd_carLength" class="form-control input-sm" v-model="carLength" name="carLength" v-validate:carLength="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in carLengthDropDown" v-bind:value="option.value">
											{{ option.text }}
										</option>
									</select>
								</div>
								<label class="w-s pull-left control-label">承运方式<span class="text-danger">*</span></label>
								<div class="col-lg-2">
									<select id="inquiryAdd_carrierCategory" class="form-control input-sm" v-model="carrierCategory" name="carrierCategory" v-validate:carrierCategory="['required']">
										<option value="" selected>请选择</option>
										<option v-for="option in carrierCategoryDropDown" v-bind:value="option.value">
											{{ option.text }}
										</option>
									</select>
								</div>
								
								<label class="w-s pull-left control-label">装车效果</label>
								<div class="col-lg-2">
									<input id="inquiryAdd_loadingEffect" name="loadingEffect" type="text" class="form-control input-sm" v-model="loadingEffect" placeholder="请填写装车效果" >
								</div>
							</div>
						</fieldset>
							<div class="form-group">
								<div class="panel-heading font-bold m-b-sm" id="testr">
									附件信息
								</div>
								<div class="col-md-4 m-l-xs" v-if="!(titleInquiry=='询价单详情')">
									<label class="pull-left m-l m-r">附件上传</label>
									<div class="col-md-3 form-group">
										<!--<input type="file" accept="image/gif,image/jpeg,image/jpg,image/png,image/bmp" id="realHead" name="realHead" class="col-md-1" ng-hide="true" />-->
										<input type="file" @change="onFileChange" accept="image/gif,image/jpeg,image/jpg,image/png,image/bmp" multiple>
									</div>
								</div>
								<div class="wrapper-sm">
									<div class="line  pull-in"></div>
									<div class="wrapper-sm bg-light dk b-b m-b-xs hidden">
										<span class="">上传文件数: <b class="badge bg-info">{{}}</b></span>
									</div>
									<v-client-table class="editTables" :data="imageLists" :columns="imageColumns" :options="imageOptions" style="overflow:hidden; min-width:1000px;"></v-client-table>
									<!--<button v-if="!(titleInquiry=='询价单详情')" id="inquiryAdd_uploadAll" type="button" class="btn btn-sm btn-addon btn-success" disabled="disabled" @click="attachmentUploader()">
										<i class="fa fa-arrow-circle-o-up"></i> 全部上传
									</button>-->
								</div>
							</div>
						<fieldset id="fieldsetDisabledTwo">
							<div class="form-group">
								<label class="col-lg-1 pull-left control-label">备注</label>
								<div class="col-lg-10">
									<textarea class="form-control" v-model="attachmentDetails" placeholder="请填写备注" name="attachmentDetails"></textarea>
								</div>
							</div>
							<div class="form-group" v-if="!(titleInquiry=='询价单详情')">
								<label class="col-lg-1 pull-left control-label"></label>
								<div class="col-lg-2">
									<!--ng-disabled="!inquiryForms.$valid"--> 
									<button id="inquiryAdd_addChild" type="button"  class="btn btn-sm btn-info btn-addon" v-bind:class="{'disabled' : !$validation.valid}" @click="addInquiryChild($validation.valid)">
										<i class="glyphicon glyphicon-plus"></i>新增
									</button>
								</div>
							</div>
							<div class="form-group" v-if="!(titleInquiry=='询价单详情')">
								<div class="panel-heading font-bold m-b-sm">
									子询价单列表
								</div>
								<div class="wrapper-sm">
									<div class="table-responsive table-cel-k">
										<v-client-table class="editTables" :data="tableData" :columns="columns" :options="options" style="overflow:hidden; min-width:1000px;"></v-client-table>
									</div>
									<!--<div class="table-responsive">
										<div ui-grid="inquiryChildViewList" ui-grid-auto-resize style="height:{{heightI}}px; min-height:35px; min-width:1000px;overflow:hidden">
											<div class="watermark" ng-if="!inquiryChildViewList.data.length">暂无数据</div>
										</div>
									</div>-->
								</div>
							</div>
						</fieldset>
						<div class="form-group">
							<div class="col-lg-5">
								<a id="inquiryAdd_release" type="button" class="pull-right-xs btn btn-sm btn-primary btn-addon" v-show="showLinkToInquiry" @click="linkToInquiryDetail()" >
									<i class="glyphicon glyphicon-list-alt"></i>前往该询价单
								</a>
								<!--ng-disabled="saveDis"-->
								<button id="inquiryAdd_release" type="button" class="pull-right-xs btn btn-sm btn-primary btn-addon" v-show="titleInquiry=='询价单新增'" v-bind:class="{'disabled' : tableData.length<=0}" @click="inquirySave(tableData.length>0)">
									<i class="glyphicon glyphicon-ok"></i>询价发布
								</button>
								<a id="inquiryAdd_cancel" type="button" href='#!/inquiry/inquiryReleaseManage' class="pull-right-xs btn btn-sm btn-info btn-addon "><i class="glyphicon glyphicon-arrow-left"></i>返回</a>
							</div>
						</div>
					</form>
				</validator>
			</div>
		</div>
	</div>
</div>